package com.aaa.java09;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2022/7/12 14:38
 * @description：狗类
 * @modified By：
 * @version: 1.0
 */
public  class Dog  extends MyPet   {
    private String species;

    public Dog() {
    }

    public Dog(String name, int age, String color, String species) {
        super(name, age, color);
        this.species = species;
    }

    public String getSpecies() {
        return species;
    }

    public void setSpecies(String species) {
        this.species = species;
    }

    public void watchDoor(){
        System.out.println(super.getName()+"在看门");
    }

    @Override
    public void playWithOwner() {
        System.out.println(super.getName()+"陪我玩抓飞盘");
    }

    @Override
    public void eat() {
        System.out.println("啃骨头");
    }

    @Override
    public String toString() {

        return "Dog{" +
                "species='" + species + '\'' +super.toString()+
                '}';
    }

}
